package binaryday01;

public class Demo09 {
    public static void main(String[] args) {
        /**
         * >>>逻辑右移位：数字向右移动，低位自动溢出，高位补0
         * >>数学右移位，低位自动溢出，正数高位补0，负数高位补1，数学除以2，向小方向取整数
         */

        int s1 = Integer.MAX_VALUE-1;
        int n = -52;
        int m = n>>1;
        int k = n>>2;
        int g = n>>3;
        int s = n>>4;
        int x = n>>>1;
        int s2=s1<<1;

        System.out.println(s2);
        System.out.println(Integer.toBinaryString(n));
        System.out.println(m);
        System.out.println(k);




        System.out.println(g);
        System.out.println(s);
        System.out.println(x);

    }
}
